/**
 * 
 */
package com.fox.webapp.domain;

import java.util.Date;

import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author yockii
 *
 */
@Document
public class Person {

	@Id
	private ObjectId id;
	@Indexed(unique = true)
	private String username;
	private String password;
	private String resetPasswordCode;
	@Transient
	private String confirmPassword;
	private String firstName;
	private String lastName;
	private String mobile;
	private Boolean mobileVerified;
	private Integer mobileVerifyCode;
	private String email;
	private Boolean emailVerified;
	private String emailVerifyCode;
	private String emailModifyCode;
	private String securityQuestion;
	private String securityAnswer;
	@Transient
	private Integer accountTotal;
	
	private Bank bank;
	
	private Double totalBalance;
	private Double withDrawing;
	private Double totalCommission;
	private Double unReturnedCommission;
	private Double credit;

	private String headerImgId;
	
	private String referenceId;
	
	private String registerIp;
	private Date registerTime;
	private String lastLoginIp;
	
	private Integer refLevel;//1-5;
	
	private Boolean isIpWarning;
	
	/**
	 * @return the totalCommission
	 */
	public Double getTotalCommission() {
		return totalCommission;
	}
	/**
	 * @param totalCommission the totalCommission to set
	 */
	public void setTotalCommission(Double totalCommission) {
		this.totalCommission = totalCommission;
	}
	/**
	 * @return the unReturnedCommission
	 */
	public Double getUnReturnedCommission() {
		return unReturnedCommission;
	}
	/**
	 * @param unReturnedCommission the unReturnedCommission to set
	 */
	public void setUnReturnedCommission(Double unReturnedCommission) {
		this.unReturnedCommission = unReturnedCommission;
	}
	/**
	 * @return the mobileVerified
	 */
	public Boolean getMobileVerified() {
		return mobileVerified;
	}
	/**
	 * @param mobileVerified the mobileVerified to set
	 */
	public void setMobileVerified(Boolean mobileVerified) {
		this.mobileVerified = mobileVerified;
	}
	/**
	 * @return the emailVerified
	 */
	public Boolean getEmailVerified() {
		return emailVerified;
	}
	/**
	 * @param emailVerified the emailVerified to set
	 */
	public void setEmailVerified(Boolean emailVerified) {
		this.emailVerified = emailVerified;
	}
	/**
	 * @return the credit
	 */
	public Double getCredit() {
		return credit;
	}
	public String getSecurityQuestion() {
		return securityQuestion;
	}
	public void setSecurityQuestion(String securityQuestion) {
		this.securityQuestion = securityQuestion;
	}
	public String getSecurityAnswer() {
		return securityAnswer;
	}
	public void setSecurityAnswer(String securityAnswer) {
		this.securityAnswer = securityAnswer;
	}
	/**
	 * @param credit the credit to set
	 */
	public void setCredit(Double credit) {
		this.credit = credit;
	}
	/**
	 * @return the id
	 */
	public ObjectId getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(ObjectId id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}
	
	/**
	 * @return the mobile
	 */
	public String getMobile() {
		return mobile;
	}
	/**
	 * @param mobile the mobile to set
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}
	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}
	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the confirmPassword
	 */
	public String getConfirmPassword() {
		return confirmPassword;
	}
	/**
	 * @param confirmPassword the confirmPassword to set
	 */
	public void setConfirmPassword(String confirmPassword) {
		this.confirmPassword = confirmPassword;
	}
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * @return the firstName
	 */
	public String getFirstName() {
		return firstName;
	}
	/**
	 * @param firstName the firstName to set
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	/**
	 * @return the lastName
	 */
	public String getLastName() {
		return lastName;
	}
	/**
	 * @param lastName the lastName to set
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public Integer getAccountTotal() {
		return accountTotal;
	}

	public void setAccountTotal(Integer accountTotal) {
		this.accountTotal = accountTotal;
	}

	/**
	 * @return the mobileVerifyCode
	 */
	public Integer getMobileVerifyCode() {
		return mobileVerifyCode;
	}
	/**
	 * @param mobileVerifyCode the mobileVerifyCode to set
	 */
	public void setMobileVerifyCode(Integer mobileVerifyCode) {
		this.mobileVerifyCode = mobileVerifyCode;
	}
	/**
	 * @return the emailVerifyCode
	 */
	public String getEmailVerifyCode() {
		return emailVerifyCode;
	}
	/**
	 * @param emailVerifyCode the emailVerifyCode to set
	 */
	public void setEmailVerifyCode(String emailVerifyCode) {
		this.emailVerifyCode = emailVerifyCode;
	}
	public Bank getBank() {
		return bank;
	}

	public void setBank(Bank bank) {
		this.bank = bank;
	}

	public Double getTotalBalance() {
		return totalBalance;
	}

	public void setTotalBalance(Double totalBalance) {
		this.totalBalance = totalBalance;
	}
	/**
	 * @return the headerImgId
	 */
	public String getHeaderImgId() {
		return headerImgId;
	}
	/**
	 * @param headerImgId the headerImgId to set
	 */
	public void setHeaderImgId(String headerImgId) {
		this.headerImgId = headerImgId;
	}
	/**
	 * @return the referenceId
	 */
	public String getReferenceId() {
		return referenceId;
	}
	/**
	 * @param referenceId the referenceId to set
	 */
	public void setReferenceId(String referenceId) {
		this.referenceId = referenceId;
	}
	/**
	 * @return the registerIp
	 */
	public String getRegisterIp() {
		return registerIp;
	}
	/**
	 * @param registerIp the registerIp to set
	 */
	public void setRegisterIp(String registerIp) {
		this.registerIp = registerIp;
	}
	/**
	 * @return the lastLoginIp
	 */
	public String getLastLoginIp() {
		return lastLoginIp;
	}
	/**
	 * @param lastLoginIp the lastLoginIp to set
	 */
	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}
	public Date getRegisterTime() {
		return registerTime;
	}
	public void setRegisterTime(Date registerTime) {
		this.registerTime = registerTime;
	}
	public Double getWithDrawing() {
		return withDrawing;
	}
	public void setWithDrawing(Double withDrawing) {
		this.withDrawing = withDrawing;
	}
	/**
	 * @return the refLevel
	 */
	public Integer getRefLevel() {
		return refLevel;
	}
	/**
	 * @param refLevel the refLevel to set
	 */
	public void setRefLevel(Integer refLevel) {
		this.refLevel = refLevel;
	}
	/**
	 * @return the resetPasswordCode
	 */
	public String getResetPasswordCode() {
		return resetPasswordCode;
	}
	/**
	 * @param resetPasswordCode the resetPasswordCode to set
	 */
	public void setResetPasswordCode(String resetPasswordCode) {
		this.resetPasswordCode = resetPasswordCode;
	}
	/**
	 * @return the emailModifyCode
	 */
	public String getEmailModifyCode() {
		return emailModifyCode;
	}
	/**
	 * @param emailModifyCode the emailModifyCode to set
	 */
	public void setEmailModifyCode(String emailModifyCode) {
		this.emailModifyCode = emailModifyCode;
	}
	/**
	 * @return the isIpWarning
	 */
	public Boolean getIsIpWarning() {
		return isIpWarning;
	}
	/**
	 * @param isIpWarning the isIpWarning to set
	 */
	public void setIsIpWarning(Boolean isIpWarning) {
		this.isIpWarning = isIpWarning;
	}
	
}
